Integrand size = 45, antiderivative size = 495 \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{5/2}} \, dx=\frac {2 \left (8 A b^4+6 a^3 b B-2 a b^3 B+3 a^4 (A-C)-a^2 b^2 (15 A+C)\right ) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{3 a^4 \sqrt {a+b} \left (a^2-b^2\right ) d}+\frac {2 \left (8 A b^3+2 a b^2 (3 A-B)-3 a^3 (A-B-C)-a^2 b (9 A+3 B+C)\right ) \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{3 a^3 \sqrt {a+b} \left (a^2-b^2\right ) d}+\frac {2 \left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}}-\frac {2 \left (4 A b^4+5 a^3 b B-a b^3 B-2 a^4 C-2 a^2 b^2 (4 A+C)\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right )^2 d \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \]
[Out]
Time = 1.69 (sec) , antiderivative size = 495, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.089, Rules used = {3134, 3077, 2895, 3073} \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{5/2}} \, dx=\frac {2 \sin (c+d x) \left (A b^2-a (b B-a C)\right )}{3 a d \left (a^2-b^2\right ) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}}+\frac {2 \cot (c+d x) \left (-3 a^3 (A-B-C)-a^2 b (9 A+3 B+C)+2 a b^2 (3 A-B)+8 A b^3\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right )}{3 a^3 d \sqrt {a+b} \left (a^2-b^2\right )}+\frac {2 \cot (c+d x) \left (3 a^4 (A-C)+6 a^3 b B-a^2 b^2 (15 A+C)-2 a b^3 B+8 A b^4\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} E\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right )}{3 a^4 d \sqrt {a+b} \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \left (-2 a^4 C+5 a^3 b B-2 a^2 b^2 (4 A+C)-a b^3 B+4 A b^4\right )}{3 a^2 d \left (a^2-b^2\right )^2 \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \]
[In]
[Out]
Rule 2895
Rule 3073
Rule 3077
Rule 3134
Rubi steps \begin{align*} \text {integral}& = \frac {2 \left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}}+\frac {2 \int \frac {\frac {1}{2} \left (-4 A b^2+a b B+a^2 (3 A-C)\right )-\frac {3}{2} a (A b-a B+b C) \cos (c+d x)+\left (A b^2-a (b B-a C)\right ) \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{3/2}} \, dx}{3 a \left (a^2-b^2\right )} \\ & = \frac {2 \left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}}-\frac {2 \left (4 A b^4+5 a^3 b B-a b^3 B-2 a^4 C-2 a^2 b^2 (4 A+C)\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right )^2 d \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}+\frac {4 \int \frac {\frac {1}{4} \left (8 A b^4+6 a^3 b B-2 a b^3 B+3 a^4 (A-C)-a^2 b^2 (15 A+C)\right )+\frac {1}{4} a \left (2 A b^3+3 a^3 B+a b^2 B-2 a^2 b (3 A+2 C)\right ) \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \cos (c+d x)}} \, dx}{3 a^2 \left (a^2-b^2\right )^2} \\ & = \frac {2 \left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}}-\frac {2 \left (4 A b^4+5 a^3 b B-a b^3 B-2 a^4 C-2 a^2 b^2 (4 A+C)\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right )^2 d \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}+\frac {\left (8 A b^4+6 a^3 b B-2 a b^3 B+3 a^4 (A-C)-a^2 b^2 (15 A+C)\right ) \int \frac {1+\cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \cos (c+d x)}} \, dx}{3 a^2 \left (a^2-b^2\right )^2}+\frac {\left (8 A b^3+2 a b^2 (3 A-B)-3 a^3 (A-B-C)-a^2 b (9 A+3 B+C)\right ) \int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \, dx}{3 a^2 (a-b) (a+b)^2} \\ & = \frac {2 \left (8 A b^4+6 a^3 b B-2 a b^3 B+3 a^4 (A-C)-a^2 b^2 (15 A+C)\right ) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{3 a^4 (a-b) (a+b)^{3/2} d}+\frac {2 \left (8 A b^3+2 a b^2 (3 A-B)-3 a^3 (A-B-C)-a^2 b (9 A+3 B+C)\right ) \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{3 a^3 (a-b) (a+b)^{3/2} d}+\frac {2 \left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}}-\frac {2 \left (4 A b^4+5 a^3 b B-a b^3 B-2 a^4 C-2 a^2 b^2 (4 A+C)\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right )^2 d \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 7.69 (sec) , antiderivative size = 1516, normalized size of antiderivative = 3.06 \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{5/2}} \, dx=-\frac {-\frac {4 a \left (9 a^4 A b-17 a^2 A b^3+8 A b^5-3 a^5 B+5 a^3 b^2 B-2 a b^4 B+a^4 b C-a^2 b^3 C\right ) \sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{(a+b) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}-4 a \left (3 a^5 A-15 a^3 A b^2+8 a A b^4+6 a^4 b B-2 a^2 b^3 B-3 a^5 C-a^3 b^2 C\right ) \left (\frac {\sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{(a+b) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}-\frac {\sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticPi}\left (-\frac {a}{b},\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{b \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}\right )+2 \left (3 a^4 A b-15 a^2 A b^3+8 A b^5+6 a^3 b^2 B-2 a b^4 B-3 a^4 b C-a^2 b^3 C\right ) \left (\frac {i \cos \left (\frac {1}{2} (c+d x)\right ) \sqrt {a+b \cos (c+d x)} E\left (i \text {arcsinh}\left (\frac {\sin \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\cos (c+d x)}}\right )|-\frac {2 a}{-a-b}\right ) \sec (c+d x)}{b \sqrt {\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)} \sqrt {\frac {(a+b \cos (c+d x)) \sec (c+d x)}{a+b}}}+\frac {2 a \left (\frac {a \sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{(a+b) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}-\frac {a \sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticPi}\left (-\frac {a}{b},\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{b \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}\right )}{b}+\frac {\sqrt {a+b \cos (c+d x)} \sin (c+d x)}{b \sqrt {\cos (c+d x)}}\right )}{3 a^3 (a-b)^2 (a+b)^2 d}+\frac {\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \left (-\frac {2 \left (A b^3 \sin (c+d x)-a b^2 B \sin (c+d x)+a^2 b C \sin (c+d x)\right )}{3 a^2 \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac {2 \left (9 a^2 A b^3 \sin (c+d x)-5 A b^5 \sin (c+d x)-6 a^3 b^2 B \sin (c+d x)+2 a b^4 B \sin (c+d x)+3 a^4 b C \sin (c+d x)+a^2 b^3 C \sin (c+d x)\right )}{3 a^3 \left (a^2-b^2\right )^2 (a+b \cos (c+d x))}+\frac {2 A \tan (c+d x)}{a^3}\right )}{d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(9126\) vs. \(2(463)=926\).
Time = 18.86 (sec) , antiderivative size = 9127, normalized size of antiderivative = 18.44
method | result | size |
default | \(\text {Expression too large to display}\) | \(9127\) |
parts | \(\text {Expression too large to display}\) | \(9184\) |
[In]
[Out]
\[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{5/2}} \, dx=\int { \frac {C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {5}{2}} \cos \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{5/2}} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{5/2}} \, dx=\int { \frac {C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {5}{2}} \cos \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
\[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{5/2}} \, dx=\int { \frac {C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {5}{2}} \cos \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{5/2}} \, dx=\int \frac {C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )+A}{{\cos \left (c+d\,x\right )}^{3/2}\,{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{5/2}} \,d x \]
[In]
[Out]